/**
 * 
 */
package com.alkandros.calculator.manager;

import android.util.Log;

/**
 * @author Jiju Induchoodan
 *
 */
public class Calculator {
	
	
	public static float calculate(int length, int breadth, int depth, float material,int type)
	{
		Log.e("", "Length--"+length+"--Breadth--"+breadth+"--Depth--"+depth+"--Material--"+material);
		float cubicYards=0;
		if(type ==1) // Rectangular
		{
			cubicYards = (length*breadth*depth)/material;
		}
		else if(type==2)   //circle
		{
			cubicYards = (float) ((3.14*length*length*depth)/material);
			
		}
		else if(type==3)  //triangle
		{
			cubicYards  = ((length*breadth*depth)/2)/material;
		}
		return cubicYards;
	}

}
